3.3.35 \(\int \frac {(c (d \sec (e+f x))^p)^n}{(a+a \sec (e+f x))^2} \, dx\) [235]

Optimal. Leaf size=248 \[ \frac {2 (2-n p) \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{3 a^2 f \sqrt {\sin ^2(e+f x)}}-\frac {(3-2 n p) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{3 a^2 f \sqrt {\sin ^2(e+f x)}}-\frac {2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2} \]

[Out]

2/3*(-n*p+2)*hypergeom([1/2, -1/2*n*p],[-1/2*n*p+1],cos(f*x+e)^2)*(c*(d*sec(f*x+e))^p)^n*sin(f*x+e)/a^2/f/(sin
(f*x+e)^2)^(1/2)-1/3*(-2*n*p+3)*cos(f*x+e)*hypergeom([1/2, -1/2*n*p+1/2],[-1/2*n*p+3/2],cos(f*x+e)^2)*(c*(d*se
c(f*x+e))^p)^n*sin(f*x+e)/a^2/f/(sin(f*x+e)^2)^(1/2)-2/3*(-n*p+2)*(c*(d*sec(f*x+e))^p)^n*tan(f*x+e)/a^2/f/(1+s
ec(f*x+e))-1/3*(c*(d*sec(f*x+e))^p)^n*tan(f*x+e)/f/(a+a*sec(f*x+e))^2

________________________________________________________________________________________

Rubi [A]
time = 0.31, antiderivative size = 248, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {4033, 3902, 4105, 3872, 3857, 2722} \begin {gather*} \frac {2 (2-n p) \sin (e+f x) \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f \sqrt {\sin ^2(e+f x)}}-\frac {(3-2 n p) \sin (e+f x) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f \sqrt {\sin ^2(e+f x)}}-\frac {2 (2-n p) \tan (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{3 a^2 f (\sec (e+f x)+1)}-\frac {\tan (e+f x) \left (c (d \sec (e+f x))^p\right )^n}{3 f (a \sec (e+f x)+a)^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c*(d*Sec[e + f*x])^p)^n/(a + a*Sec[e + f*x])^2,x]

[Out]

(2*(2 - n*p)*Hypergeometric2F1[1/2, -1/2*(n*p), (2 - n*p)/2, Cos[e + f*x]^2]*(c*(d*Sec[e + f*x])^p)^n*Sin[e +
f*x])/(3*a^2*f*Sqrt[Sin[e + f*x]^2]) - ((3 - 2*n*p)*Cos[e + f*x]*Hypergeometric2F1[1/2, (1 - n*p)/2, (3 - n*p)
/2, Cos[e + f*x]^2]*(c*(d*Sec[e + f*x])^p)^n*Sin[e + f*x])/(3*a^2*f*Sqrt[Sin[e + f*x]^2]) - (2*(2 - n*p)*(c*(d
*Sec[e + f*x])^p)^n*Tan[e + f*x])/(3*a^2*f*(1 + Sec[e + f*x])) - ((c*(d*Sec[e + f*x])^p)^n*Tan[e + f*x])/(3*f*
(a + a*Sec[e + f*x])^2)

Rule 2722

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1
)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n
}, x] &&  !IntegerQ[2*n]

Rule 3857

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x])^(n - 1)*((Sin[c + d*x]/b)^(n - 1)
*Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] &&  !IntegerQ[n]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3902

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-Cot[
e + f*x])*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(f*(2*m + 1))), x] + Dist[1/(a^2*(2*m + 1)), Int[(a + b*C
sc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*(a*(2*m + n + 1) - b*(m + n + 1)*Csc[e + f*x]), x], x] /; FreeQ[{a, b,
 d, e, f, n}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -1] && (IntegersQ[2*m, 2*n] || IntegerQ[m])

Rule 4033

Int[((c_.)*((d_.)*sec[(e_.) + (f_.)*(x_)])^(p_))^(n_)*((a_.) + (b_.)*sec[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol]
 :> Dist[c^IntPart[n]*((c*(d*Sec[e + f*x])^p)^FracPart[n]/(d*Sec[e + f*x])^(p*FracPart[n])), Int[(a + b*Sec[e
+ f*x])^m*(d*Sec[e + f*x])^(n*p), x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] &&  !IntegerQ[n]

Rule 4105

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(b*f*(
2*m + 1))), x] - Dist[1/(a^2*(2*m + 1)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*Simp[b*B*n - a*A*
(2*m + n + 1) + (A*b - a*B)*(m + n + 1)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, n}, x] && NeQ[
A*b - a*B, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)] &&  !GtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+a \sec (e+f x))^2} \, dx &=\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {(d \sec (e+f x))^{n p}}{(a+a \sec (e+f x))^2} \, dx\\ &=-\frac {\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac {\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \frac {(d \sec (e+f x))^{n p} (a (-3+n p)-a (-1+n p) \sec (e+f x))}{a+a \sec (e+f x)} \, dx}{3 a^2}\\ &=-\frac {2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}-\frac {\left ((d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \left (-a^2 (3-2 n p) (1-n p)-2 a^2 n p (2-n p) \sec (e+f x)\right ) \, dx}{3 a^4}\\ &=-\frac {2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left ((3-2 n p) (1-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{n p} \, dx}{3 a^2}+\frac {\left (2 n p (2-n p) (d \sec (e+f x))^{-n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int (d \sec (e+f x))^{1+n p} \, dx}{3 a^2 d}\\ &=-\frac {2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}+\frac {\left ((3-2 n p) (1-n p) \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-n p} \, dx}{3 a^2}+\frac {\left (2 n p (2-n p) \left (\frac {\cos (e+f x)}{d}\right )^{n p} \left (c (d \sec (e+f x))^p\right )^n\right ) \int \left (\frac {\cos (e+f x)}{d}\right )^{-1-n p} \, dx}{3 a^2 d}\\ &=\frac {2 (2-n p) \, _2F_1\left (\frac {1}{2},-\frac {n p}{2};\frac {1}{2} (2-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{3 a^2 f \sqrt {\sin ^2(e+f x)}}-\frac {(3-2 n p) \cos (e+f x) \, _2F_1\left (\frac {1}{2},\frac {1}{2} (1-n p);\frac {1}{2} (3-n p);\cos ^2(e+f x)\right ) \left (c (d \sec (e+f x))^p\right )^n \sin (e+f x)}{3 a^2 f \sqrt {\sin ^2(e+f x)}}-\frac {2 (2-n p) \left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 a^2 f (1+\sec (e+f x))}-\frac {\left (c (d \sec (e+f x))^p\right )^n \tan (e+f x)}{3 f (a+a \sec (e+f x))^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [F]
time = 9.83, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (c (d \sec (e+f x))^p\right )^n}{(a+a \sec (e+f x))^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(c*(d*Sec[e + f*x])^p)^n/(a + a*Sec[e + f*x])^2,x]

[Out]

Integrate[(c*(d*Sec[e + f*x])^p)^n/(a + a*Sec[e + f*x])^2, x]

________________________________________________________________________________________

Maple [F]
time = 0.13, size = 0, normalized size = 0.00 \[\int \frac {\left (c \left (d \sec \left (f x +e \right )\right )^{p}\right )^{n}}{\left (a +a \sec \left (f x +e \right )\right )^{2}}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d*sec(f*x+e))^p)^n/(a+a*sec(f*x+e))^2,x)

[Out]

int((c*(d*sec(f*x+e))^p)^n/(a+a*sec(f*x+e))^2,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n/(a+a*sec(f*x+e))^2,x, algorithm="maxima")

[Out]

integrate(((d*sec(f*x + e))^p*c)^n/(a*sec(f*x + e) + a)^2, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n/(a+a*sec(f*x+e))^2,x, algorithm="fricas")

[Out]

integral(((d*sec(f*x + e))^p*c)^n/(a^2*sec(f*x + e)^2 + 2*a^2*sec(f*x + e) + a^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (c \left (d \sec {\left (e + f x \right )}\right )^{p}\right )^{n}}{\sec ^{2}{\left (e + f x \right )} + 2 \sec {\left (e + f x \right )} + 1}\, dx}{a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))**p)**n/(a+a*sec(f*x+e))**2,x)

[Out]

Integral((c*(d*sec(e + f*x))**p)**n/(sec(e + f*x)**2 + 2*sec(e + f*x) + 1), x)/a**2

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c*(d*sec(f*x+e))^p)^n/(a+a*sec(f*x+e))^2,x, algorithm="giac")

[Out]

integrate(((d*sec(f*x + e))^p*c)^n/(a*sec(f*x + e) + a)^2, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (c\,{\left (\frac {d}{\cos \left (e+f\,x\right )}\right )}^p\right )}^n}{{\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c*(d/cos(e + f*x))^p)^n/(a + a/cos(e + f*x))^2,x)

[Out]

int((c*(d/cos(e + f*x))^p)^n/(a + a/cos(e + f*x))^2, x)

________________________________________________________________________________________